package my.mall.common.exception

import my.mall.common.enums.RespMetaEnum

class WebBaseException : RuntimeException {
    val status: Int
    val msg: String

    constructor(status: Int, msg: String) : super(msg) {
        this.status = status
        this.msg = msg
    }

    constructor(status: Int, msg: String, throwable: Throwable?) : super(msg, throwable) {
        this.status = status
        this.msg = msg
    }

    constructor(code: RespMetaEnum) : this(code.status, code.msg)
    constructor(code: RespMetaEnum, throwable: Throwable?) : this(code.status, code.msg, throwable)
}
